<% @nav_dispaly_project_label = 1 %>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8"/>
  <title><%= h html_title %></title>
  <meta name="description" content="<%= Redmine::Info.app_name %>"/>
  <meta name="keywords" content="issue,bug,tracker"/>
  <%= csrf_meta_tag %>
  <%= favicon %>
  <%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'application', 'nyan', :media => 'all' %>
  <%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
  <%= javascript_heads %>
  <%= heads_for_theme %>
  <%= call_hook :view_layouts_base_html_head %>
  <%= javascript_include_tag "ckeditor/ckeditor.js" %>
  <!-- page specific tags -->
  <%= yield :header_tags -%>
  <link href="../stylesheets/bootstrap/bootstrap.min.css" media="screen" rel="stylesheet" type="text/css"/>
</head>

<body class="<%= h body_css_classes %>">
<div id="wrapper">
  <div id="wrapper2">
    <div id="wrapper3">
      <div id="main">
      	<div id="content" style="width: 100%">
			<div id="project_base_info" style="margin-top: 15px; padding-left: 15px; border:1px solid rgb(225,225,225);">
				<table class="base_info">
					<tr id="project_name">
						<td style="width: 350px; font-size: 20px">
							<% if(@user.ProfileImageUrl.nil?) %>
								<img src="../images/avatars/Project/no_profile.png", class="avatar2", width="40px", height="40px" />
							<% else %>
								<img src="<%=@user.ProfileImageUrl %>", class="avatar2", width="40px", height="40px" />
							<% end %>
							
							<% if(@user.WebsiteUrl.nil?) %>
								<a><%=@user.DisplayName %></a>
							<% else %>
								<a href="<%=@user.WebsiteUrl %>"><%=@user.DisplayName %></a>
							<% end %>
						</td>
						<td class="font_index" style="width: 150px;">
		                  <%= "View" %>:&nbsp
		                  <span class="font_aram">
		                    <%= short_num_eng (@user.Views.nil?) ? 0 : @user.Views %>
		                  </span>
		                </td>
		                <td class="font_index" style="width: 150px;">
		                  <%= "Reputation" %>:&nbsp
		                  <span class="font_aram">
		                    <%= short_num_eng (@user.Reputation.nil?) ? 0 : @user.Reputation %>
		                  </span>
		                </td>
		                <td class="font_index" style="width: 220px;">
		                  <%= "Join" %>:&nbsp
		                  <span class="font_aram" style="color: rgb(123,123,123);">
		                    <%= (@user.CreationDate).to_s[0, 10] %>
		                  </span>
		                </td>
		                <td class="font_index" style="width: 420px;">
		                	<%= "Location" %>:&nbsp
		                	<span class="font_aram" style="color: rgb(123,123,123);">
		                    <%= (@user.Location.nil?)?"no location information":@user.Location %>
		                 	</span>
		                </td>
					</tr>
				</table>
				
				<div id="project_desc" class="base_info">
		            <span class="project_source" style="font-size: 13px"><%= "About Me" %>：</span>
		            <% require "plain_text" %>
		            <%= (@user.AboutMe.nil?)?"No introduction temporarily":(raw PlainText.plain_text(@user.AboutMe)) %>
		        </div>
				
				<div id="project_tags" class="base_info" style="margin-bottom: 20px;">
					
					<div style="float: left;">
				        <span><%= image_tag("/images/sidebar/tags.png") %></span>
				        <span class="font_title_tag">Tags:</span>
				    </div>
				    <% tags = nil %>
				    <% if(@userTag.nil?) %>
				    	<a>&nbsp;&nbsp;No tag information temporarily</a>
				    <% else %>
				    	<% tags = @userTag.AllTags.to_s[1..-2].split(',') %>
				    	<% for i in (0..tags.size-1) %>
	                		<% tag = tags[i] %>
	                		<% if(i < 9) %>
	                			<a>&nbsp;&nbsp;<%=tag.to_s %></a>
	                		<% else %>
	                		<% break %>
	                		<% end %>
	                	<% end %>
				    <% end %>
                	
            	</div>
			</div>
			
			
			
			<div id="projects-index">
				<ul class="projects">
					<% for i in (0..@sta_git_matches.size-1) %>
						<% match = @sta_git_matches[i] %>
							<script type="text/javascript">
								$(document).ready(function(){
								var response = $.ajax({ type: "GET",   
								                        url: "<%=GithubProject.find(match.prjId).url %>",   
								                        async: false
								                      }).responseText;
								a = response.toString();
								if(a != null && a.indexOf('html_url') > 0){
									a = a.substring(a.indexOf('html_url') + 9);
									if(a.indexOf(',') > 0){
										a = a.substring(0, a.indexOf(','));
										a = a.substring(a.indexOf('\"') + 1, a.lastIndexOf('\"'));
										$("#github<%=i.to_s %>").attr("href",a);
									}
								}else{
								}								
								});
							</script>
							<li class="project-table">
								<div class="root">
									<a id=<%="github" + i.to_s %> href="<%=GithubProject.find(match.prjId).url %>" class="project root leaf"><%= GithubProject.find(match.prjId).name %></a>
									<span style="float: right;"></span>
									<%= render :partial => 'ossean_sta_git_matchs/os_sta_git_match_show', :locals => {:project => GithubProject.find(match.prjId), :i => i, :match_score => match.match_score} %>
									
								</div>
								
								
							</li>
					<% end %>
					
					<% if(@sta_git_matches.size == 0) %>
						<li class="project-table">
								<div class="root">
									<span>No recommendation information</span>
								</div>
							</li>
					<% end %>
				</ul>
			</div>
			
			<div class="pagination">
				<ul>
					<%= pagination_links_full @projects_pages, @projects_count %>
				</ul>
			</div>
			
		</div>
      </div>
    </div>
    <%= call_hook :view_layouts_base_body_bottom %>
  </div>
</body>
</html>


